HAL RTC backup functions migration ¶
This section provides information about the HAL RTC backup functions migration.
Note
The RTC handle is removed in HAL2, so for the following RTC HAL2 functions, the handle will be removed from the parameters.
Related concept: Other HAL RTC changes
HAL RTC BKUP write ¶
|
HAL1 |
HAL2 |
|---|---|
void HAL_RTCEx_BKUPWrite(RTC_HandleTypeDef *hrtc,
uint32_t BackupRegister,
uint32_t Data)
|
hal_status_t HAL_TAMP_WriteBackupRegisterValue(hal_tamp_backup_register_idx_t backup_register_index,
uint32_t data_32bit)
|
HAL RTC BKUP read ¶
|
HAL1 |
HAL2 |
|---|---|
uint32_t HAL_RTCEx_BKUPRead(RTC_HandleTypeDef *hrtc,
uint32_t BackupRegister)
|
uint32_t HAL_TAMP_ReadBackupRegisterValue(hal_tamp_backup_register_idx_t backup_register_index)
|
HAL RTC BKUP erase ¶
|
HAL1 |
HAL2 |
|---|---|
void HAL_RTCEx_BKUPErase(RTC_HandleTypeDef *hrtc)
|
hal_status_t HAL_TAMP_EraseDeviceSecrets(void)
|
HAL RTC BKUP block enable ¶
|
HAL1 |
HAL2 |
|---|---|
void HAL_RTCEx_BKUPBlock_Enable(RTC_HandleTypeDef *hrtc)
|
hal_status_t HAL_TAMP_BlockDeviceSecretsAccess(void)
|
HAL RTC BKUP block disable ¶
|
HAL1 |
HAL2 |
|---|---|
void HAL_RTCEx_BKUPBlock_Disable(RTC_HandleTypeDef *hrtc)
|
hal_status_t HAL_TAMP_UnblockDeviceSecretsAccess(void)
|
HAL RTC erase secret device configuration ¶
|
HAL1 |
HAL2 |
|---|---|
void HAL_RTCEx_Erase_SecretDev_Conf(RTC_HandleTypeDef *hrtc,
uint32_t SecretDeviceConf)
|
hal_status_t HAL_TAMP_EnableResourceProtection(uint32_t resources)
hal_status_t HAL_TAMP_DisableResourceProtection(uint32_t resources)
|
HAL RTC get erase secret device configuration ¶
|
HAL1 |
HAL2 |
|---|---|
uint32_t HAL_RTCEx_Get_Erase_SecretDev_Conf(void)
|
hal_status_t HAL_TAMP_IsEnabledResourceProtection(uint32_t resources)
|